import { request } from '@/utils/request'

export interface studentRequest {
  studentNo: string
}
export interface studentResponse {
  data: {
    code: number | string
    data: {}
    msg: string
  }
}

// 获取学生信息
export async function getStudentRequest(params: studentRequest): Promise<studentResponse> {
  return request({
    url: '/stuclient/api/studentClient/getStudentInfo',
    method: 'get',
    params,
    checkToken: false,
  })
}

// 设置-获取学生设置页面信息
export async function getStudentSettingInfo(): Promise<studentResponse> {
  return request({
    url: '/stuclient/api/studentClient/getStudentSettingInfo',
    method: 'get',
  })
}

// 设置-学生签退
export async function studentLogout(): Promise<studentResponse> {
  return request({
    url: '/stuclient/api/studentClient/studentLogout',
    method: 'get',
  })
}

// 设置-重置学生基本信息
export async function resetStudentSettingInfoRequest(data): Promise<studentResponse> {
  return request({
    url: '/stuclient/api/studentClient/resetStudentSettingInfo',
    method: 'post',
    data,
  })
}

// 设置-登录状态重置学生密码
export async function studentLoginResetPwdRequest(data): Promise<studentResponse> {
  return request({
    url: '/stuclient/api/studentClient/studentLoginResetPwd',
    method: 'post',
    data,
  })
}
